
a,b=[int(i) for i in input().split()]
q,r=divmod(a,b)
print(q,r)